<?php

namespace app\admin\controller;

use think\Controller;

class System extends Controller
{
    public function edit(){
        if (request()->isAjax()){
            $data = [
              'webname' => input('post.webname'),
              'copyright' => input('copyright')
            ];
            $result = model('System')->edit($data);
            if ($result == 1){
                $this->success('更新成功', 'admin/system/edit');
            }else{
                $this->error($result);
            }
        }
        $systems = model('System')->find();
        $this->assign('systems', $systems);
        return view();
    }
}
